#ifndef LOGINDIALOG_H
#define LOGINDIALOG_H

#include "autoload.h"
#include "Logic/xmlbuilder.h"
#include "mainwindow.h"
#include "Logic/errordict.h"
#include "Transport/clientapplication.h"

namespace Ui {
    class LoginDialog;
}

class LoginDialog : public QDialog
{
    Q_OBJECT
public:
    explicit LoginDialog(QWidget *parent = 0);
    ~LoginDialog();

public slots:
    void ProceedAuthorization();
    void Failed(QString cause);
    void ProceedRegistration();

private:
    void MakeConnection(QString IP, QString Port,bool);

private slots:
    void on_pBLogin_clicked();

    void on_pBRegister_clicked();

private:
    Ui::LoginDialog *ui;
    MainWindow * child;
    void InitSlots(bool);
    void DestroySlots();
};

#endif // LOGINDIALOG_H
